{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 一. 查看所有磁盘分区信息\n",
    "\n",
    "```sh\n",
    "fdisk -l\n",
    "```\n",
    "查找新硬盘信息，类似如下文本：  \n",
    "\n",
    "```\n",
    "Disk /dev/sda：1.8 TiB，2000398934016 字节，3907029168 个扇区\n",
    "单元：扇区 / 1 * 512 = 512 字节\n",
    "扇区大小(逻辑/物理)：512 字节 / 4096 字节\n",
    "I/O 大小(最小/最佳)：4096 字节 / 4096 字节\n",
    "磁盘标签类型：gpt\n",
    "磁盘标识符：F8BDD86E-E7BD-4B89-853B-AE3D5BB3286B\n",
    "\n",
    "设备          起点       末尾       扇区  大小 类型\n",
    "/dev/sda1     2048    1050623    1048576  512M EFI 系统\n",
    "/dev/sda2  1050624 3907028991 3905978368  1.8T Linux LVM\n",
    "```\n",
    "\n",
    "# 二. 挂载硬盘\n",
    "\n",
    "1. 在本地硬盘中临时创建一个目录\n",
    "\n",
    "```sh\n",
    "mkdir /opt/data/tmp1 \n",
    "```\n",
    "\n",
    "2. 挂载硬盘中的二个分区/dev/sda2到tmp1\n",
    "\n",
    "```\n",
    "mount /dev/sda2 /opt/data/tmp1 \n",
    "```\n",
    "\n",
    "3. 查看是否被挂载\n",
    "\n",
    "```sh\n",
    "df -h\n",
    "```\n",
    "\n",
    "查看一下是否有类似如下文本  \n",
    "/dev/sda2 。。。。 /opt/tmp/tmp1\n",
    "\n",
    "# 三. 卸载硬盘\n",
    "\n",
    "```sh\n",
    "umount /dev/sdb1\n",
    "```"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
